import React from 'react';
import { useSelector } from 'react-redux';
import Item from './Item';

function List() {
    console.log('re-render List');
    const ids = useSelector((state: any) => state.list.users.ids);

    return (
        <ul>
            {ids.map((id: string) => {
                return <Item key={id} id={id} />;
            })}
        </ul>
    );
}

export default List;
